# 把停用词做成字典

from dataPath import stopWordpath

file_object2 = open(stopWordpath,'r', encoding='utf-8')
#stopWordsDic = [line.strip() for line in open(stopWordpath, 'r',encoding='utf-8').readlines()]    #以行的形式读取停用词表，同时转换为列表
temp = file_object2.readlines()
stopWordsDic = ''.join(temp).strip('\n')
#stopWordsDic = [line.strip("\n") for line in temp]    #以行的形式读取停用词表，同时转换为列表
file_object2.close()
def inStopwordDic(str):
    if str in stopWordsDic:
        return True
    else:
        return False
def test():
    file_object2 = open(stopWordpath,'r', encoding='utf-8')
    stopWordsDic = file_object2.readlines()
    for line in stopWordsDic:
        print (line.strip("\n"))

    file_object2.close()
